//package com.example.tests;

import com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.util.regex.Pattern;

public class DealerCIS_idrConfirmation_TextVerify extends SeleneseTestCase {
	@Before
	public void setUp() throws Exception {
		selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://www.gfwfn.com/idrLogin.php");
		selenium.start();
	}@Test
	public void testUntitled() throws Exception {
		selenium.open("/idrLogin.php");
		selenium.type("id=txtSalesCode", "99999");
		selenium.click("name=submit");
		selenium.waitForPageToLoad("30000");
		selenium.type("id=txtEmail", "thomasjohn@net.net");
		selenium.click("name=submit");
		selenium.waitForPageToLoad("30000");
		verifyTrue(selenium.isElementPresent("id=header"));
		verifyTrue(selenium.isElementPresent("id=header"));
		verifyTrue(selenium.isElementPresent("css=h2"));
		verifyTrue(selenium.isTextPresent("Hello!"));
		verifyTrue(selenium.isTextPresent("John Thompson\nthomasjohn@net.net"));
		verifyTrue(selenium.isElementPresent("css=strong"));
		verifyTrue(selenium.isElementPresent("//form[@id='regForm']/div/p[2]"));
		verifyTrue(selenium.isTextPresent("exact:You have been entered for a chance to win an all-new 2013 \n Ford Fusion courtesy of Ford Credit!* Please make sure your \n information is correct."));
		verifyTrue(selenium.isTextPresent("YES! I want to tryout and test my \n judging skills with American Idol®!"));
		verifyTrue(selenium.isElementPresent("id=cbOptIn"));
		verifyTrue(selenium.isElementPresent("css=label"));
		verifyTrue(selenium.isElementPresent("link=Appearance Release"));
		verifyTrue(selenium.isTextPresent("Appearance Release"));
		verifyTrue(selenium.isTextPresent("YES! I want to tryout and test my \n judging skills with American Idol®! \n I have read and agree to the terms of the \n Appearance Release."));
		verifyTrue(selenium.isElementPresent("//form[@id='regForm']/div/p[4]"));
		verifyTrue(selenium.isTextPresent("exact:*Must be licensed driver 18 years or older, no purchase necessary, see official sweepstakes rules for complete details."));
		verifyTrue(selenium.isElementPresent("css=img"));
		verifyTrue(selenium.isElementPresent("css=a > img"));
		verifyTrue(selenium.isElementPresent("name=submit"));
		verifyTrue(selenium.isElementPresent("link=www.americanidol.com"));
		verifyTrue(selenium.isElementPresent("link=Official Rules"));
		verifyTrue(selenium.isElementPresent("link=Privacy Statement"));
		verifyTrue(selenium.isElementPresent("link=CA Privacy Statement"));
		verifyTrue(selenium.isElementPresent("id=header"));
	}

	

	@After
	public void tearDown() throws Exception {
		selenium.stop();
	}
}
